﻿using Architecture.Domain.Service;
using Architeture.Domain;
using MediatR;
using RBAC.ZhuBoLin.Application.Command.RoleCommand.Menu;

namespace RBAC.ZhuBoLin.Application.CommandHandlers.RoleHandler.Menu
{
    public class MenuSelectInfoCommandHandler : IRequestHandler<MenuSelectInfoCommand, List<MenuInfo>>
    {
        protected readonly IMenuSerivice menuSerivice;

        public MenuSelectInfoCommandHandler(IMenuSerivice menuSerivice)
        {
            this.menuSerivice = menuSerivice;
        }

        public async Task<List<MenuInfo>> Handle(MenuSelectInfoCommand request, CancellationToken cancellationToken)
        {
            return await menuSerivice.GetSelectMenu();
        }
    }
}
